package cn.fancy.sdk.service;

import java.util.HashMap;
import java.util.Map;

import cn.fancy.sdk.service.utils.QdHttpReq;

class QdUrlEnvSet {
	
	private static String URL_GET_SER_NUMBER		= "http://sdk.support.fancy.com/api/get_qq.php";
	private static String URL_CHECK_SWITCH			= "http://sdk.support.fancy.com/api/check_status.php";
	
	static String genChatPageURL()
	{
		final Map<String, String> params = new HashMap<>();
		String _gameid 		= QdUserInfo.output(params, QdUserInfo.PARAMS_GAMEID, "gameid");
		String _platformid		= QdUserInfo.output(params, QdUserInfo.PARAMS_PLATFORMID, "platformid");
		String _ditchid		 	= QdUserInfo.output(params, QdUserInfo.PARAMS_DITCHID, "ditchid");
		String _key				= QdUserInfo.output(params, QdUserInfo.PARAMS_KEY);
		
		QdUserInfo.output(params, QdUserInfo.PARAMS_VERSION, "SdkVersion");
		String sign = QdHttpReq.md5(_gameid + _platformid + _ditchid + _key);
		params.put("sign", sign);
		return (URL_GET_SER_NUMBER + "?" + QdHttpReq.genUrlString(params));
	}
	
	static String getStatusUrl()
	{
		return URL_CHECK_SWITCH;
	}
	
}
